﻿// See https://aka.ms/new-console-template for more information

using Newtonsoft.Json;
using SqlSugar;
using XjjXmm.CodeGenerator;
using XjjXmm.CodeGenerator.FileStangy;

var connectionString = "Server=192.168.88.25; Port=3306; Database=admindb; Uid=root; Pwd=123456; Charset=utf8mb4;";
    var dbType = DbType.MySql;

//var codeGenerator = new CodeGenerator(connectionString, dbType);
var codeGenerator = new CodeGenerator();
codeGenerator.GeneratorEntity("javaConvertService.cshtml", new DasFileGeneratorStrangy());
//var dbContext = new DbModel(connectionString, dbType);
//var tables = dbContext.GetTableInfoList();

//foreach (var table in tables)
//{
//    Console.WriteLine($"{ table.Name}:{table.Description}");

//    var colunms = dbContext.GetColumnInfosByTableName(table.Name);
//     foreach (var column in colunms)
//    {
//        //Console.WriteLine($"{JsonConvert.SerializeObject(column)}");

//        Console.WriteLine($"{column.DbColumnName}:{column.DataType}:{column.ColumnDescription}:{column.IsPrimarykey}:{column.IsIdentity}:{column.IsNullable}");
//    }

//    break;
//}

Console.WriteLine("Hello, World!");
